{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e44a44d0",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## 数据集介绍\n",
    "<img src=\"./img/iris数据集介绍.png\"/>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "da5223a4",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T12:59:06.488486Z",
     "start_time": "2021-05-22T12:59:04.884209Z"
    },
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [],
   "source": [
    "# 导入相关模块\n",
    "import sklearn.datasets as skdata\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "import pandas as pd\n",
    "import sklearn.model_selection as skmodel\n",
    "import sklearn.neighbors as skneighbors\n",
    "import sklearn.preprocessing as skprep"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "44ff37f2",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T00:23:48.855272Z",
     "start_time": "2021-05-22T00:23:48.848197Z"
    },
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## 加载iris数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "b43bca76",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:01:47.598721Z",
     "start_time": "2021-05-22T13:01:47.573426Z"
    },
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': array([[5.1, 3.5, 1.4, 0.2],\n",
       "        [4.9, 3. , 1.4, 0.2],\n",
       "        [4.7, 3.2, 1.3, 0.2],\n",
       "        [4.6, 3.1, 1.5, 0.2],\n",
       "        [5. , 3.6, 1.4, 0.2],\n",
       "        [5.4, 3.9, 1.7, 0.4],\n",
       "        [4.6, 3.4, 1.4, 0.3],\n",
       "        [5. , 3.4, 1.5, 0.2],\n",
       "        [4.4, 2.9, 1.4, 0.2],\n",
       "        [4.9, 3.1, 1.5, 0.1],\n",
       "        [5.4, 3.7, 1.5, 0.2],\n",
       "        [4.8, 3.4, 1.6, 0.2],\n",
       "        [4.8, 3. , 1.4, 0.1],\n",
       "        [4.3, 3. , 1.1, 0.1],\n",
       "        [5.8, 4. , 1.2, 0.2],\n",
       "        [5.7, 4.4, 1.5, 0.4],\n",
       "        [5.4, 3.9, 1.3, 0.4],\n",
       "        [5.1, 3.5, 1.4, 0.3],\n",
       "        [5.7, 3.8, 1.7, 0.3],\n",
       "        [5.1, 3.8, 1.5, 0.3],\n",
       "        [5.4, 3.4, 1.7, 0.2],\n",
       "        [5.1, 3.7, 1.5, 0.4],\n",
       "        [4.6, 3.6, 1. , 0.2],\n",
       "        [5.1, 3.3, 1.7, 0.5],\n",
       "        [4.8, 3.4, 1.9, 0.2],\n",
       "        [5. , 3. , 1.6, 0.2],\n",
       "        [5. , 3.4, 1.6, 0.4],\n",
       "        [5.2, 3.5, 1.5, 0.2],\n",
       "        [5.2, 3.4, 1.4, 0.2],\n",
       "        [4.7, 3.2, 1.6, 0.2],\n",
       "        [4.8, 3.1, 1.6, 0.2],\n",
       "        [5.4, 3.4, 1.5, 0.4],\n",
       "        [5.2, 4.1, 1.5, 0.1],\n",
       "        [5.5, 4.2, 1.4, 0.2],\n",
       "        [4.9, 3.1, 1.5, 0.2],\n",
       "        [5. , 3.2, 1.2, 0.2],\n",
       "        [5.5, 3.5, 1.3, 0.2],\n",
       "        [4.9, 3.6, 1.4, 0.1],\n",
       "        [4.4, 3. , 1.3, 0.2],\n",
       "        [5.1, 3.4, 1.5, 0.2],\n",
       "        [5. , 3.5, 1.3, 0.3],\n",
       "        [4.5, 2.3, 1.3, 0.3],\n",
       "        [4.4, 3.2, 1.3, 0.2],\n",
       "        [5. , 3.5, 1.6, 0.6],\n",
       "        [5.1, 3.8, 1.9, 0.4],\n",
       "        [4.8, 3. , 1.4, 0.3],\n",
       "        [5.1, 3.8, 1.6, 0.2],\n",
       "        [4.6, 3.2, 1.4, 0.2],\n",
       "        [5.3, 3.7, 1.5, 0.2],\n",
       "        [5. , 3.3, 1.4, 0.2],\n",
       "        [7. , 3.2, 4.7, 1.4],\n",
       "        [6.4, 3.2, 4.5, 1.5],\n",
       "        [6.9, 3.1, 4.9, 1.5],\n",
       "        [5.5, 2.3, 4. , 1.3],\n",
       "        [6.5, 2.8, 4.6, 1.5],\n",
       "        [5.7, 2.8, 4.5, 1.3],\n",
       "        [6.3, 3.3, 4.7, 1.6],\n",
       "        [4.9, 2.4, 3.3, 1. ],\n",
       "        [6.6, 2.9, 4.6, 1.3],\n",
       "        [5.2, 2.7, 3.9, 1.4],\n",
       "        [5. , 2. , 3.5, 1. ],\n",
       "        [5.9, 3. , 4.2, 1.5],\n",
       "        [6. , 2.2, 4. , 1. ],\n",
       "        [6.1, 2.9, 4.7, 1.4],\n",
       "        [5.6, 2.9, 3.6, 1.3],\n",
       "        [6.7, 3.1, 4.4, 1.4],\n",
       "        [5.6, 3. , 4.5, 1.5],\n",
       "        [5.8, 2.7, 4.1, 1. ],\n",
       "        [6.2, 2.2, 4.5, 1.5],\n",
       "        [5.6, 2.5, 3.9, 1.1],\n",
       "        [5.9, 3.2, 4.8, 1.8],\n",
       "        [6.1, 2.8, 4. , 1.3],\n",
       "        [6.3, 2.5, 4.9, 1.5],\n",
       "        [6.1, 2.8, 4.7, 1.2],\n",
       "        [6.4, 2.9, 4.3, 1.3],\n",
       "        [6.6, 3. , 4.4, 1.4],\n",
       "        [6.8, 2.8, 4.8, 1.4],\n",
       "        [6.7, 3. , 5. , 1.7],\n",
       "        [6. , 2.9, 4.5, 1.5],\n",
       "        [5.7, 2.6, 3.5, 1. ],\n",
       "        [5.5, 2.4, 3.8, 1.1],\n",
       "        [5.5, 2.4, 3.7, 1. ],\n",
       "        [5.8, 2.7, 3.9, 1.2],\n",
       "        [6. , 2.7, 5.1, 1.6],\n",
       "        [5.4, 3. , 4.5, 1.5],\n",
       "        [6. , 3.4, 4.5, 1.6],\n",
       "        [6.7, 3.1, 4.7, 1.5],\n",
       "        [6.3, 2.3, 4.4, 1.3],\n",
       "        [5.6, 3. , 4.1, 1.3],\n",
       "        [5.5, 2.5, 4. , 1.3],\n",
       "        [5.5, 2.6, 4.4, 1.2],\n",
       "        [6.1, 3. , 4.6, 1.4],\n",
       "        [5.8, 2.6, 4. , 1.2],\n",
       "        [5. , 2.3, 3.3, 1. ],\n",
       "        [5.6, 2.7, 4.2, 1.3],\n",
       "        [5.7, 3. , 4.2, 1.2],\n",
       "        [5.7, 2.9, 4.2, 1.3],\n",
       "        [6.2, 2.9, 4.3, 1.3],\n",
       "        [5.1, 2.5, 3. , 1.1],\n",
       "        [5.7, 2.8, 4.1, 1.3],\n",
       "        [6.3, 3.3, 6. , 2.5],\n",
       "        [5.8, 2.7, 5.1, 1.9],\n",
       "        [7.1, 3. , 5.9, 2.1],\n",
       "        [6.3, 2.9, 5.6, 1.8],\n",
       "        [6.5, 3. , 5.8, 2.2],\n",
       "        [7.6, 3. , 6.6, 2.1],\n",
       "        [4.9, 2.5, 4.5, 1.7],\n",
       "        [7.3, 2.9, 6.3, 1.8],\n",
       "        [6.7, 2.5, 5.8, 1.8],\n",
       "        [7.2, 3.6, 6.1, 2.5],\n",
       "        [6.5, 3.2, 5.1, 2. ],\n",
       "        [6.4, 2.7, 5.3, 1.9],\n",
       "        [6.8, 3. , 5.5, 2.1],\n",
       "        [5.7, 2.5, 5. , 2. ],\n",
       "        [5.8, 2.8, 5.1, 2.4],\n",
       "        [6.4, 3.2, 5.3, 2.3],\n",
       "        [6.5, 3. , 5.5, 1.8],\n",
       "        [7.7, 3.8, 6.7, 2.2],\n",
       "        [7.7, 2.6, 6.9, 2.3],\n",
       "        [6. , 2.2, 5. , 1.5],\n",
       "        [6.9, 3.2, 5.7, 2.3],\n",
       "        [5.6, 2.8, 4.9, 2. ],\n",
       "        [7.7, 2.8, 6.7, 2. ],\n",
       "        [6.3, 2.7, 4.9, 1.8],\n",
       "        [6.7, 3.3, 5.7, 2.1],\n",
       "        [7.2, 3.2, 6. , 1.8],\n",
       "        [6.2, 2.8, 4.8, 1.8],\n",
       "        [6.1, 3. , 4.9, 1.8],\n",
       "        [6.4, 2.8, 5.6, 2.1],\n",
       "        [7.2, 3. , 5.8, 1.6],\n",
       "        [7.4, 2.8, 6.1, 1.9],\n",
       "        [7.9, 3.8, 6.4, 2. ],\n",
       "        [6.4, 2.8, 5.6, 2.2],\n",
       "        [6.3, 2.8, 5.1, 1.5],\n",
       "        [6.1, 2.6, 5.6, 1.4],\n",
       "        [7.7, 3. , 6.1, 2.3],\n",
       "        [6.3, 3.4, 5.6, 2.4],\n",
       "        [6.4, 3.1, 5.5, 1.8],\n",
       "        [6. , 3. , 4.8, 1.8],\n",
       "        [6.9, 3.1, 5.4, 2.1],\n",
       "        [6.7, 3.1, 5.6, 2.4],\n",
       "        [6.9, 3.1, 5.1, 2.3],\n",
       "        [5.8, 2.7, 5.1, 1.9],\n",
       "        [6.8, 3.2, 5.9, 2.3],\n",
       "        [6.7, 3.3, 5.7, 2.5],\n",
       "        [6.7, 3. , 5.2, 2.3],\n",
       "        [6.3, 2.5, 5. , 1.9],\n",
       "        [6.5, 3. , 5.2, 2. ],\n",
       "        [6.2, 3.4, 5.4, 2.3],\n",
       "        [5.9, 3. , 5.1, 1.8]]),\n",
       " 'target': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]),\n",
       " 'frame': None,\n",
       " 'target_names': array(['setosa', 'versicolor', 'virginica'], dtype='<U10'),\n",
       " 'DESCR': '.. _iris_dataset:\\n\\nIris plants dataset\\n--------------------\\n\\n**Data Set Characteristics:**\\n\\n    :Number of Instances: 150 (50 in each of three classes)\\n    :Number of Attributes: 4 numeric, predictive attributes and the class\\n    :Attribute Information:\\n        - sepal length in cm\\n        - sepal width in cm\\n        - petal length in cm\\n        - petal width in cm\\n        - class:\\n                - Iris-Setosa\\n                - Iris-Versicolour\\n                - Iris-Virginica\\n                \\n    :Summary Statistics:\\n\\n    ============== ==== ==== ======= ===== ====================\\n                    Min  Max   Mean    SD   Class Correlation\\n    ============== ==== ==== ======= ===== ====================\\n    sepal length:   4.3  7.9   5.84   0.83    0.7826\\n    sepal width:    2.0  4.4   3.05   0.43   -0.4194\\n    petal length:   1.0  6.9   3.76   1.76    0.9490  (high!)\\n    petal width:    0.1  2.5   1.20   0.76    0.9565  (high!)\\n    ============== ==== ==== ======= ===== ====================\\n\\n    :Missing Attribute Values: None\\n    :Class Distribution: 33.3% for each of 3 classes.\\n    :Creator: R.A. Fisher\\n    :Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)\\n    :Date: July, 1988\\n\\nThe famous Iris database, first used by Sir R.A. Fisher. The dataset is taken\\nfrom Fisher\\'s paper. Note that it\\'s the same as in R, but not as in the UCI\\nMachine Learning Repository, which has two wrong data points.\\n\\nThis is perhaps the best known database to be found in the\\npattern recognition literature.  Fisher\\'s paper is a classic in the field and\\nis referenced frequently to this day.  (See Duda & Hart, for example.)  The\\ndata set contains 3 classes of 50 instances each, where each class refers to a\\ntype of iris plant.  One class is linearly separable from the other 2; the\\nlatter are NOT linearly separable from each other.\\n\\n.. topic:: References\\n\\n   - Fisher, R.A. \"The use of multiple measurements in taxonomic problems\"\\n     Annual Eugenics, 7, Part II, 179-188 (1936); also in \"Contributions to\\n     Mathematical Statistics\" (John Wiley, NY, 1950).\\n   - Duda, R.O., & Hart, P.E. (1973) Pattern Classification and Scene Analysis.\\n     (Q327.D83) John Wiley & Sons.  ISBN 0-471-22361-1.  See page 218.\\n   - Dasarathy, B.V. (1980) \"Nosing Around the Neighborhood: A New System\\n     Structure and Classification Rule for Recognition in Partially Exposed\\n     Environments\".  IEEE Transactions on Pattern Analysis and Machine\\n     Intelligence, Vol. PAMI-2, No. 1, 67-71.\\n   - Gates, G.W. (1972) \"The Reduced Nearest Neighbor Rule\".  IEEE Transactions\\n     on Information Theory, May 1972, 431-433.\\n   - See also: 1988 MLC Proceedings, 54-64.  Cheeseman et al\"s AUTOCLASS II\\n     conceptual clustering system finds 3 classes in the data.\\n   - Many, many more ...',\n",
       " 'feature_names': ['sepal length (cm)',\n",
       "  'sepal width (cm)',\n",
       "  'petal length (cm)',\n",
       "  'petal width (cm)'],\n",
       " 'filename': '/home/kevin/miniconda3/envs/machine/lib/python3.9/site-packages/sklearn/datasets/data/iris.csv'}"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris_data = skdata.load_iris()\n",
    "iris_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "153c694c",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:02:51.991326Z",
     "start_time": "2021-05-22T13:02:51.983397Z"
    },
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(sklearn.utils.Bunch,\n",
       " ['DESCR',\n",
       "  'data',\n",
       "  'feature_names',\n",
       "  'filename',\n",
       "  'frame',\n",
       "  'target',\n",
       "  'target_names'])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(iris_data), dir(iris_data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "24556127",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:03:19.238350Z",
     "start_time": "2021-05-22T13:03:19.222408Z"
    },
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['sepal length (cm)',\n",
       " 'sepal width (cm)',\n",
       " 'petal length (cm)',\n",
       " 'petal width (cm)']"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris_data.feature_names"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "56ecbe03",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## 可视化iris数据"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "903a3cf1",
   "metadata": {
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "source": [
    "Seaborn 是基于 Matplotlib 核心库进行了更高级的 API 封装，可以让你轻松地画出更漂亮的图形。而 Seaborn 的漂亮主要体现在配色更加舒服、以及图形元素的样式更加细腻。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "76d2f31e",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### 将数据集转化为pandas.DataFrame类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "cbcdb01d",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:05:22.493137Z",
     "start_time": "2021-05-22T13:05:22.456751Z"
    },
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sepal length (cm)</th>\n",
       "      <th>sepal width (cm)</th>\n",
       "      <th>petal length (cm)</th>\n",
       "      <th>petal width (cm)</th>\n",
       "      <th>Species</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5.1</td>\n",
       "      <td>3.5</td>\n",
       "      <td>1.4</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4.9</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.4</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4.7</td>\n",
       "      <td>3.2</td>\n",
       "      <td>1.3</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4.6</td>\n",
       "      <td>3.1</td>\n",
       "      <td>1.5</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5.0</td>\n",
       "      <td>3.6</td>\n",
       "      <td>1.4</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>145</th>\n",
       "      <td>6.7</td>\n",
       "      <td>3.0</td>\n",
       "      <td>5.2</td>\n",
       "      <td>2.3</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>146</th>\n",
       "      <td>6.3</td>\n",
       "      <td>2.5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>1.9</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>147</th>\n",
       "      <td>6.5</td>\n",
       "      <td>3.0</td>\n",
       "      <td>5.2</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>148</th>\n",
       "      <td>6.2</td>\n",
       "      <td>3.4</td>\n",
       "      <td>5.4</td>\n",
       "      <td>2.3</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>149</th>\n",
       "      <td>5.9</td>\n",
       "      <td>3.0</td>\n",
       "      <td>5.1</td>\n",
       "      <td>1.8</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>150 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     sepal length (cm)  sepal width (cm)  petal length (cm)  petal width (cm)  \\\n",
       "0                  5.1               3.5                1.4               0.2   \n",
       "1                  4.9               3.0                1.4               0.2   \n",
       "2                  4.7               3.2                1.3               0.2   \n",
       "3                  4.6               3.1                1.5               0.2   \n",
       "4                  5.0               3.6                1.4               0.2   \n",
       "..                 ...               ...                ...               ...   \n",
       "145                6.7               3.0                5.2               2.3   \n",
       "146                6.3               2.5                5.0               1.9   \n",
       "147                6.5               3.0                5.2               2.0   \n",
       "148                6.2               3.4                5.4               2.3   \n",
       "149                5.9               3.0                5.1               1.8   \n",
       "\n",
       "     Species  \n",
       "0          0  \n",
       "1          0  \n",
       "2          0  \n",
       "3          0  \n",
       "4          0  \n",
       "..       ...  \n",
       "145        2  \n",
       "146        2  \n",
       "147        2  \n",
       "148        2  \n",
       "149        2  \n",
       "\n",
       "[150 rows x 5 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris_df = pd.DataFrame(iris_data['data'], columns=\n",
    "                         ['sepal length (cm)',\n",
    "                             'sepal width (cm)',\n",
    "                             'petal length (cm)',\n",
    "                             'petal width (cm)'])\n",
    "iris_df['Species'] = iris_data.target\n",
    "iris_df"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9f6879ca",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### 绘制散点图，初步探索数据间关系"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "30a228e8",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:08:06.539310Z",
     "start_time": "2021-05-22T13:08:05.947770Z"
    },
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x7fe383495a90>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAFuCAYAAABeLBUoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAABU/0lEQVR4nO3dd5zcVbn48c8zdWd7zfbspjcSkhBCICBdUcACCIjiVVG8XkWxXK9yvT+v2HtBhYsCNoooIAqC9N4SkhDSe90ku5vtZfr5/TGzy26m7Oxmys7u83699pWds9/vfM9kkn3me85zniPGGJRSSql0smS6A0oppSYfDT5KKaXSToOPUkqptNPgo5RSKu00+CillEo7W6Y7MNQFF1xgHn300Ux3QymlxiPJdAeSaVzd+bS2tma6C0oppdJgXAUfpZRSk4MGH6WUUmmnwUcppVTaafBRSimVdhp8lFJKpV3Kgo+IzBGRdUO+ukTk+lRdTymlVPZI2TofY8xWYDGAiFiBg8ADqbqeUkqp7JGuYbdzgZ3GmL1pup5SSqlxLF3B50rg7mg/EJFrRWS1iKxuaWlJU3eUUkplkqR6MzkRc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wHdhozAYSyrJTajzS4KMyYSHwWrhC99eBb4UDw2XA90XkDWAdobmQAW4RWQvcAlwTbvsB8N1we6J38c8T2rirP/x9XfjPY90M5IvIZuBGht8d3QqsH5JwkIhHCA3lDbiaUKXi9cBLQNUongtCc0iPj/IcpcYNrWqtxj0ReQb4kjFmdab7cjzCWXNfNsZsP87nWQJ8wRhzdXJ6plT66Z2PUunzFUKJB8erHPifJDyPUhmjdz5KKaXSTu98lFJKpZ0GH6WUUmmnwUcppVTaafBRSimVdhp8lFJKpd3/B61prDlS9n57AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 406.375x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "\n",
    "sns.relplot(x='sepal width (cm)', y='petal length (cm)', data=iris_df, hue='Species')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a0eebdab",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T01:03:54.353070Z",
     "start_time": "2021-05-22T01:03:54.350366Z"
    },
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## 数据集的划分"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "e6dbb5ae",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:11:58.212766Z",
     "start_time": "2021-05-22T13:11:58.184000Z"
    },
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([[5.8, 2.6, 4. , 1.2],\n",
       "        [5.4, 3.9, 1.3, 0.4],\n",
       "        [6.1, 2.8, 4. , 1.3],\n",
       "        [4.6, 3.2, 1.4, 0.2],\n",
       "        [5.4, 3.9, 1.7, 0.4],\n",
       "        [4.9, 3. , 1.4, 0.2],\n",
       "        [6.2, 2.9, 4.3, 1.3],\n",
       "        [5.8, 4. , 1.2, 0.2],\n",
       "        [6.1, 2.6, 5.6, 1.4],\n",
       "        [6.7, 3.3, 5.7, 2.1],\n",
       "        [6.3, 2.3, 4.4, 1.3],\n",
       "        [5.7, 2.8, 4.5, 1.3],\n",
       "        [6. , 3. , 4.8, 1.8],\n",
       "        [5.1, 3.3, 1.7, 0.5],\n",
       "        [6.7, 3. , 5. , 1.7],\n",
       "        [5.8, 2.7, 5.1, 1.9],\n",
       "        [6.1, 2.8, 4.7, 1.2],\n",
       "        [4.9, 3.1, 1.5, 0.2],\n",
       "        [5. , 3.3, 1.4, 0.2],\n",
       "        [5.1, 2.5, 3. , 1.1],\n",
       "        [6.7, 3.1, 4.4, 1.4],\n",
       "        [7. , 3.2, 4.7, 1.4],\n",
       "        [5.3, 3.7, 1.5, 0.2],\n",
       "        [5.5, 3.5, 1.3, 0.2],\n",
       "        [5.4, 3. , 4.5, 1.5],\n",
       "        [6.5, 3. , 5.8, 2.2],\n",
       "        [7.6, 3. , 6.6, 2.1],\n",
       "        [5.1, 3.8, 1.5, 0.3],\n",
       "        [6.6, 3. , 4.4, 1.4],\n",
       "        [6.4, 2.7, 5.3, 1.9],\n",
       "        [6.8, 3. , 5.5, 2.1],\n",
       "        [5.5, 2.3, 4. , 1.3],\n",
       "        [4.8, 3.4, 1.9, 0.2],\n",
       "        [5. , 2. , 3.5, 1. ],\n",
       "        [4.8, 3. , 1.4, 0.1],\n",
       "        [6.8, 2.8, 4.8, 1.4],\n",
       "        [6.1, 2.9, 4.7, 1.4],\n",
       "        [4.9, 2.4, 3.3, 1. ],\n",
       "        [5.7, 2.8, 4.1, 1.3],\n",
       "        [4.4, 2.9, 1.4, 0.2],\n",
       "        [5.2, 4.1, 1.5, 0.1],\n",
       "        [6.9, 3.2, 5.7, 2.3],\n",
       "        [6.2, 2.2, 4.5, 1.5],\n",
       "        [6.9, 3.1, 5.1, 2.3],\n",
       "        [7.2, 3.2, 6. , 1.8],\n",
       "        [6. , 2.2, 4. , 1. ],\n",
       "        [5.1, 3.5, 1.4, 0.3],\n",
       "        [7.7, 2.6, 6.9, 2.3],\n",
       "        [5.5, 2.6, 4.4, 1.2],\n",
       "        [6.4, 2.9, 4.3, 1.3],\n",
       "        [5. , 3. , 1.6, 0.2],\n",
       "        [6.5, 3. , 5.5, 1.8],\n",
       "        [6.3, 2.9, 5.6, 1.8],\n",
       "        [5.1, 3.8, 1.9, 0.4],\n",
       "        [5.7, 2.6, 3.5, 1. ],\n",
       "        [5.2, 3.4, 1.4, 0.2],\n",
       "        [4.7, 3.2, 1.3, 0.2],\n",
       "        [5.6, 3. , 4.5, 1.5],\n",
       "        [4.8, 3.4, 1.6, 0.2],\n",
       "        [6.3, 3.3, 6. , 2.5],\n",
       "        [6. , 2.2, 5. , 1.5],\n",
       "        [6.4, 2.8, 5.6, 2.1],\n",
       "        [5.2, 2.7, 3.9, 1.4],\n",
       "        [6.1, 3. , 4.9, 1.8],\n",
       "        [5.6, 2.5, 3.9, 1.1],\n",
       "        [6.9, 3.1, 4.9, 1.5],\n",
       "        [5. , 3.5, 1.3, 0.3],\n",
       "        [5.1, 3.7, 1.5, 0.4],\n",
       "        [5.6, 2.7, 4.2, 1.3],\n",
       "        [5.4, 3.4, 1.5, 0.4],\n",
       "        [6.3, 2.5, 4.9, 1.5],\n",
       "        [5.7, 4.4, 1.5, 0.4],\n",
       "        [5.6, 3. , 4.1, 1.3],\n",
       "        [6.3, 2.7, 4.9, 1.8],\n",
       "        [5. , 2.3, 3.3, 1. ],\n",
       "        [5.7, 3.8, 1.7, 0.3],\n",
       "        [5.5, 2.4, 3.7, 1. ],\n",
       "        [5.1, 3.8, 1.6, 0.2],\n",
       "        [7.7, 3.8, 6.7, 2.2],\n",
       "        [6.5, 3. , 5.2, 2. ],\n",
       "        [6.3, 2.5, 5. , 1.9],\n",
       "        [4.6, 3.4, 1.4, 0.3],\n",
       "        [5.8, 2.7, 4.1, 1. ],\n",
       "        [5.8, 2.7, 5.1, 1.9],\n",
       "        [6.9, 3.1, 5.4, 2.1],\n",
       "        [5.7, 2.5, 5. , 2. ],\n",
       "        [6.7, 3. , 5.2, 2.3],\n",
       "        [4.3, 3. , 1.1, 0.1],\n",
       "        [5. , 3.5, 1.6, 0.6],\n",
       "        [5.2, 3.5, 1.5, 0.2],\n",
       "        [6.8, 3.2, 5.9, 2.3],\n",
       "        [6.6, 2.9, 4.6, 1.3],\n",
       "        [5.8, 2.8, 5.1, 2.4],\n",
       "        [6.1, 3. , 4.6, 1.4],\n",
       "        [6.4, 3.2, 5.3, 2.3],\n",
       "        [5.1, 3.5, 1.4, 0.2],\n",
       "        [7.4, 2.8, 6.1, 1.9],\n",
       "        [4.8, 3.1, 1.6, 0.2],\n",
       "        [5.7, 3. , 4.2, 1.2],\n",
       "        [5.6, 2.8, 4.9, 2. ],\n",
       "        [5.9, 3. , 4.2, 1.5],\n",
       "        [5.9, 3. , 5.1, 1.8],\n",
       "        [5.5, 2.5, 4. , 1.3],\n",
       "        [6.3, 3.3, 4.7, 1.6],\n",
       "        [7.7, 2.8, 6.7, 2. ],\n",
       "        [5.8, 2.7, 3.9, 1.2],\n",
       "        [5.9, 3.2, 4.8, 1.8],\n",
       "        [5.1, 3.4, 1.5, 0.2],\n",
       "        [6.3, 3.4, 5.6, 2.4],\n",
       "        [5. , 3.4, 1.6, 0.4],\n",
       "        [7.2, 3.6, 6.1, 2.5],\n",
       "        [5.6, 2.9, 3.6, 1.3],\n",
       "        [4.8, 3. , 1.4, 0.3],\n",
       "        [5. , 3.4, 1.5, 0.2],\n",
       "        [5.5, 4.2, 1.4, 0.2],\n",
       "        [4.6, 3.6, 1. , 0.2],\n",
       "        [6.4, 3.1, 5.5, 1.8],\n",
       "        [4.9, 3.1, 1.5, 0.1],\n",
       "        [7.1, 3. , 5.9, 2.1],\n",
       "        [6.2, 3.4, 5.4, 2.3]]),\n",
       " array([[4.4, 3.2, 1.3, 0.2],\n",
       "        [7.3, 2.9, 6.3, 1.8],\n",
       "        [4.7, 3.2, 1.6, 0.2],\n",
       "        [6. , 3.4, 4.5, 1.6],\n",
       "        [6. , 2.9, 4.5, 1.5],\n",
       "        [4.5, 2.3, 1.3, 0.3],\n",
       "        [5.5, 2.4, 3.8, 1.1],\n",
       "        [4.4, 3. , 1.3, 0.2],\n",
       "        [4.6, 3.1, 1.5, 0.2],\n",
       "        [7.2, 3. , 5.8, 1.6],\n",
       "        [6.3, 2.8, 5.1, 1.5],\n",
       "        [5.7, 2.9, 4.2, 1.3],\n",
       "        [4.9, 2.5, 4.5, 1.7],\n",
       "        [6.5, 2.8, 4.6, 1.5],\n",
       "        [6.7, 3.1, 4.7, 1.5],\n",
       "        [6.7, 3.3, 5.7, 2.5],\n",
       "        [6.4, 2.8, 5.6, 2.2],\n",
       "        [5.4, 3.4, 1.7, 0.2],\n",
       "        [6.5, 3.2, 5.1, 2. ],\n",
       "        [7.7, 3. , 6.1, 2.3],\n",
       "        [6.7, 3.1, 5.6, 2.4],\n",
       "        [4.9, 3.6, 1.4, 0.1],\n",
       "        [6.7, 2.5, 5.8, 1.8],\n",
       "        [6.4, 3.2, 4.5, 1.5],\n",
       "        [6. , 2.7, 5.1, 1.6],\n",
       "        [5.4, 3.7, 1.5, 0.2],\n",
       "        [5. , 3.2, 1.2, 0.2],\n",
       "        [7.9, 3.8, 6.4, 2. ],\n",
       "        [5. , 3.6, 1.4, 0.2],\n",
       "        [6.2, 2.8, 4.8, 1.8]]),\n",
       " array([1, 0, 1, 0, 0, 0, 1, 0, 2, 2, 1, 1, 2, 0, 1, 2, 1, 0, 0, 1, 1, 1,\n",
       "        0, 0, 1, 2, 2, 0, 1, 2, 2, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 2, 1, 2,\n",
       "        2, 1, 0, 2, 1, 1, 0, 2, 2, 0, 1, 0, 0, 1, 0, 2, 2, 2, 1, 2, 1, 1,\n",
       "        0, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 2, 2, 2, 0, 1, 2, 2, 2, 2, 0,\n",
       "        0, 0, 2, 1, 2, 1, 2, 0, 2, 0, 1, 2, 1, 2, 1, 1, 2, 1, 1, 0, 2, 0,\n",
       "        2, 1, 0, 0, 0, 0, 2, 0, 2, 2]),\n",
       " array([0, 2, 0, 1, 1, 0, 1, 0, 0, 2, 2, 1, 2, 1, 1, 2, 2, 0, 2, 2, 2, 0,\n",
       "        2, 1, 1, 0, 0, 2, 0, 2]))"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train, x_test, y_train, y_test = skmodel.train_test_split(iris_data.data, iris_data.target, test_size=0.2)\n",
    "x_train, x_test, y_train, y_test"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "899c2b08",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T01:14:10.952561Z",
     "start_time": "2021-05-22T01:14:10.950324Z"
    },
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## 使用KNN算法做预测"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0e15cccd",
   "metadata": {
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "source": [
    "sklearn.neighbors.KNeighborsClassifier(n_neighbors=5,algorithm='auto')\n",
    "* n_neighbors：\n",
    "int,可选（默认= 5），k_neighbors查询默认使用的邻居数\n",
    "* algorithm：{‘auto’，‘ball_tree’，‘kd_tree’，‘brute’}\n",
    " * 快速k近邻搜索算法，默认参数为auto，可以理解为算法自己决定合适的搜索算法。除此之外，用户也可以自己指定搜索算法ball_tree、kd_tree、brute方法进行搜索，\n",
    " * brute是蛮力搜索，也就是线性扫描，当训练集很大时，计算非常耗时。\n",
    " * kd_tree，构造kd树存储数据以便对其进行快速检索的树形数据结构，kd树也就是数据结构中的二叉树。以中值切分构造的树，每个结点是一个超矩形，在维数小于20时效率高。\n",
    " * ball tree是为了克服kd树高纬失效而发明的，其构造过程是以质心C和半径r分割样本空间，每个节点是一个超球体。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "2ac64c00",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:20:05.438816Z",
     "start_time": "2021-05-22T13:20:05.424590Z"
    },
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "KNeighborsClassifier(n_neighbors=100)"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "knn_model = skneighbors.KNeighborsClassifier(n_neighbors=7)\n",
    "knn_model.fit(x_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "9a49bee3",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:26:31.454979Z",
     "start_time": "2021-05-22T13:26:31.440414Z"
    },
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([False, False, False,  True,  True, False,  True, False, False,\n",
       "       False, False,  True, False,  True,  True, False, False, False,\n",
       "       False, False, False, False, False,  True,  True, False, False,\n",
       "       False, False, False])"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_predict = knn_model.predict(x_test)\n",
    "y_predict == y_test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "c5d2dd17",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-05-22T13:26:54.789093Z",
     "start_time": "2021-05-22T13:26:54.755279Z"
    },
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "ename": "ValueError",
     "evalue": "Found input variables with inconsistent numbers of samples: [120, 30]",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-30-c98e50292c37>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0;31m# 计算准确率\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mscore\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mknn_model\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscore\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx_test\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx_train\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      3\u001b[0m \u001b[0mscore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/miniconda3/envs/machine/lib/python3.9/site-packages/sklearn/base.py\u001b[0m in \u001b[0;36mscore\u001b[0;34m(self, X, y, sample_weight)\u001b[0m\n\u001b[1;32m    498\u001b[0m         \"\"\"\n\u001b[1;32m    499\u001b[0m         \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mmetrics\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0maccuracy_score\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 500\u001b[0;31m         \u001b[0;32mreturn\u001b[0m \u001b[0maccuracy_score\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpredict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mX\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msample_weight\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msample_weight\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    501\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    502\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_more_tags\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/miniconda3/envs/machine/lib/python3.9/site-packages/sklearn/utils/validation.py\u001b[0m in \u001b[0;36minner_f\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m     61\u001b[0m             \u001b[0mextra_args\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mall_args\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     62\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mextra_args\u001b[0m \u001b[0;34m<=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 63\u001b[0;31m                 \u001b[0;32mreturn\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     64\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     65\u001b[0m             \u001b[0;31m# extra_args > 0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/miniconda3/envs/machine/lib/python3.9/site-packages/sklearn/metrics/_classification.py\u001b[0m in \u001b[0;36maccuracy_score\u001b[0;34m(y_true, y_pred, normalize, sample_weight)\u001b[0m\n\u001b[1;32m    200\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    201\u001b[0m     \u001b[0;31m# Compute accuracy for each possible representation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 202\u001b[0;31m     \u001b[0my_type\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_true\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_pred\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_check_targets\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my_true\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_pred\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    203\u001b[0m     \u001b[0mcheck_consistent_length\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my_true\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_pred\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msample_weight\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    204\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0my_type\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstartswith\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'multilabel'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/miniconda3/envs/machine/lib/python3.9/site-packages/sklearn/metrics/_classification.py\u001b[0m in \u001b[0;36m_check_targets\u001b[0;34m(y_true, y_pred)\u001b[0m\n\u001b[1;32m     81\u001b[0m     \u001b[0my_pred\u001b[0m \u001b[0;34m:\u001b[0m \u001b[0marray\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mindicator\u001b[0m \u001b[0mmatrix\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     82\u001b[0m     \"\"\"\n\u001b[0;32m---> 83\u001b[0;31m     \u001b[0mcheck_consistent_length\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my_true\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_pred\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     84\u001b[0m     \u001b[0mtype_true\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtype_of_target\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my_true\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     85\u001b[0m     \u001b[0mtype_pred\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtype_of_target\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my_pred\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/miniconda3/envs/machine/lib/python3.9/site-packages/sklearn/utils/validation.py\u001b[0m in \u001b[0;36mcheck_consistent_length\u001b[0;34m(*arrays)\u001b[0m\n\u001b[1;32m    317\u001b[0m     \u001b[0muniques\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0munique\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlengths\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    318\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0muniques\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 319\u001b[0;31m         raise ValueError(\"Found input variables with inconsistent numbers of\"\n\u001b[0m\u001b[1;32m    320\u001b[0m                          \" samples: %r\" % [int(l) for l in lengths])\n\u001b[1;32m    321\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mValueError\u001b[0m: Found input variables with inconsistent numbers of samples: [120, 30]"
     ]
    }
   ],
   "source": [
    "# 计算准确率\n",
    "score = knn_model.score(x_test, x_train)\n",
    "score"
   ]
  }
 ],
 "metadata": {
  "celltoolbar": "幻灯片",
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
